package com.lixin.utils;

import lombok.Getter;

@Getter
public enum ResultCode {
    PARAM_ERROR(1000, "请提供有效的参数"),
    USER_REGISTER_SUCCESS(2000, "注册成功"),
    USER_REGISTER_ERROR(1000, "注册失败"),
    USER_ACCOUNT_USED(1000, "账号被占用"),
    USER_ACCOUNT_CAN_USE(1000, "账号可以使用"),
    USER_LOGIN_EXPIRED(1000, "登录已过期"),
    USER_ACCOUNT_NOT_EXISTED(1000, "用户账号不存在"),
    USER_PASSWORD_ERROR(1000, "用户密码错误"),
    USER_LOGIN_SUCCESS(2000, "登录成功"),
    TOKEN_GEN_ERROR(1000, "token生成失败"),
    SERVER_ERROR(1000, "服务器在摸鱼"),
    SUCCESS(2000, "操作成功"),
    FAIL(1000, "操作失败");

    private final Integer code;
    private final String message;

    private ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
